import apiInit from "@/api/index"
export default (context, inject) => {
  const { $axios } = context

  $axios.setBaseURL("http://localhost:3000/")
  $axios.onRequest((request) => {
    return request
  })

  $axios.onResponse((response) => {
    return response.data
  })

  inject("api", apiInit($axios))
}
